package com.zhentao.controller;

import com.zhentao.model.common.app.dto.ApUserActiveFindAllDto;
import com.zhentao.model.common.app.pojo.UserActive;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ApUserActiveService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.naming.spi.ResolveResult;

@RestController
@RequestMapping("/app/UserActive")
@Api(tags = "app端：活动跟踪表")
public class ApUserActiveController {
    @Autowired
    private ApUserActiveService apUserActiveService;


    /**
     * 查看自己参加的活动
     * @param dto
     * @return
     */
    @PostMapping("/ApUserActiveFIndAll")
    @ApiOperation("活动跟踪表查询")
    private ResponseResult ApUserActiveFIndAll(@RequestBody ApUserActiveFindAllDto dto){
       return apUserActiveService.ApUserActiveFIndAll(dto);
    }

    /**
     * app端：添加活动跟走表
     * @param userActive
     * @return
     */
    @PostMapping("apUserActiveSave")
    @ApiOperation("活动跟踪表添加")
    private ResponseResult apUserActiveSave(@RequestBody UserActive userActive){
        return apUserActiveService.apUserActiveSave(userActive);
    }
}
